package c.x.jy.bean.event.listener;

import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;

import c.x.jy.bean.event.OrderEvent;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class OrderShipListener {

 
	/**
	 * 锁定设备格子，更新订单状态
	 * @param orderEvent
	 */
	@Async
	@EventListener
	public void paySuccess(OrderEvent  orderEvent) {
		System.out.println(JSON.toJSONString(orderEvent)); 
		System.out.println(" 订单下单成功");
		//OrderEntityDto order=	(OrderEntityDto) orderEvent.getData(); 
		//OrderPayIncomeRecordEntity opayitem =order.getPayitemlist().get(0);
	//	EventPublisher.publishEvent(new OrderLogEvent(this,order.getId(),order.getMemberId(),order.getBusinessId(),"订单","订单创建成功！" ));
	//	EventPublisher.publishEvent(new OrderLogEvent(this,order.getId(),order.getMemberId(),order.getBusinessId(),"订单","应付订单生成!<a href='javascript:; class=\"payOrder\"' onclick=\"orderItemInfo('"+opayitem.getNo()+"')\"   >详情</a>" ));
	}










}
